package com.lkr.webapp.bean;

import lombok.Getter;
import lombok.Setter;
import sun.nio.cs.ext.MS874;

/**
 * 响应消息
 *
 * @author lss
 * @date 2019-01-20, Sun
 */
@Getter
@Setter
public class ResponseMessage extends BaseMessage {

    /**
     * 消息响应码、成功
     */
    public static final int CODE_OK = 200;

    /**
     * 消息响应码、服务器内部错误
     */
    public static final int CODE_SERVER_ERROR = 500;

    /**
     * 响应消息类型、普通消息响应
     */
    public static final int TYPE_COMMON = 101;

    /**
     * 响应消息类型、socket消息
     */
    public static final int TYPE_SOCKET = 102;

    /**
     * 消息响应码
     */
    private int code;


    /**
     * 消息类型
     */
    private int type;

    public ResponseMessage(int type) {
        super();
        this.code = CODE_OK;
        this.type = type;
    }


    public static ResponseMessage getResponseMessageForIncorrectArgs() {
        ResponseMessage message = new ResponseMessage(ResponseMessage.TYPE_COMMON);
        return message;
    }
}
